<?php
function getStatus($db,$id,$url){//$id
	if(is_object($db) && $id != "" && $url != ""){
		$tmp = explode('?',$url);
		$temp = explode('/',$tmp[0]);
		$new_url = '';
		for($i = 0 ;$i <= count($temp)-1; $i++){
			if($i == 2){
				$new_url = $temp[$i];
			}else if($i > 2){
				$new_url .= '/'.$temp[$i];
			}
		}
		$sql = "SELECT COUNT(*) AS NUM FROM meinian_admin_user_role AS A,meinian_admin_role_permission AS B ,meinian_admin_permission AS C WHERE A.USER_ID='$id' AND A.role_ID=B.role_ID AND C.ID=B.permission_ID AND C.URL = '$new_url' ";
		//*
		foreach($db->doSql($sql) as $tmp);
		if($tmp['NUM'] == 1){
			return false;
		}else{
			return true;
		}
		//*/
	}else{
		return true;
	}
}
function getQuestionType($type){
	$result = '';
	switch($type){
		case 1: $result = '多选';break;
		case 2: $result = '单选';break;
		case 3: $result = '填空';break;
		default:break;
	}
	return $result;
}